<template>
  <div class="header" :style="{ padding: padding }">
    <div class="logo h50 flex a-center">
      <img v-if="logo" :src="logo" alt="" />
      <span v-else></span>
    </div>
    <div class="search h50 flex a-center">
      <el-input
        suffix-icon="el-icon-search"
        placeholder="请输入关键词"
      ></el-input>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    padding: {
      default: "0px 12%",
    },
    logo: {
      default: "",
    },
  },
};
</script>

<style lang="scss" scoped>
::v-deep .el-input__suffix {
  cursor: pointer;
  font-size: 20px;
  right: 12px;
  color: rgba($color: #666, $alpha: 0.5);
  i {
    font-weight: bold;
  }
}
::v-deep .el-input__inner {
  border-radius: 10px;
  background-color: rgba($color: #fff, $alpha: 0.8);
  font-size: 16px;
  outline: none;
  &::placeholder {
    color: #000 !important;
  }
  &:focus {
    border-color: rgba($color: #fff, $alpha: 0.8);
  }
}
.h50 {
  height: 50px;
}
.flex {
  display: flex;
}
.a-center {
  align-items: center;
}
.header {
  height: 192px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #af251b;
  .logo {
    width: 487px;
    height: 63px;
  }
}
</style>
